package com.preknow.HHHH;

public class A {
    int a;
    public A() {
        a = 1;
    }
    public void add(int m, A n) {
        m++;
        n.a++;
    }

    public static void main(String[] args) {
        int x = 5;
        A y = new A();
        System.out.println("调用前简单类型变量x="+x);
        System.out.println("调用前引用类型变量y的属性y.a="+y.a);
        y.add(x, y);
        System.out.println("调用后简单类型变量x="+x);
        System.out.println("调用后引用类型变量y的属性y.a="+y.a);
    }
}
